﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
    <link rel="stylesheet" href="../js/miniui/miniui.css" />
    <script src="../js/jquery-3.3.1.min.js"></script>
    <script src="../js/vue.min.js"></script>
    <script src="../js/config.js"></script>
    <style>
        html, body {
            padding: 0px;
            margin: 0px;
        }
        .searh_len{
            height:64px;
            width:100%;
        }
            .searh_len input {
                margin-top: 15px;
                margin-left: 10px;
                padding-left:10px;
                height: 34px;
                width: 240px;
            }
        .mini-grid-columns-view {
            overflow: initial;
        }
        .item {
            height: 44px;
            line-height: 44px;
            border-bottom: 1px solid #dddddd;
            padding-left: 12px;
            font-size: 14px;
        }
        .mini-grid-row {
            background-color: #fff;
        }

        .colorbg {
            background-color: aliceblue;
        }
        .mini-grid-headerCell, .mini-grid-cell {
            height: 34px;
            line-height: 34px;
        }
        .content {
            width: 100%;
            height: calc(100% - 85px);
            overflow: auto;
            float: left;
        }
    </style> 
</head>
<body>
    <div id="app">
        <div class="searh_len">
            <input type="text" v-model="path"/>

        </div>
        <div class="content">
         <!--  <div class="item" v-for="item in list" @click="SetClick(item)">{{item.ComapnyName}}</div>--> 
            <div class="mini-grid-rows-view" style="margin-left: 0px; width: 100%;">
                <div class="mini-grid-columns-view" style="margin-left: 0px; width: auto; height: auto; padding-right: 0px;">
                    <table class="mini-grid-table" cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
                        <tbody>
                            <tr style="height:0px;">
                                <td style="height:0px;width:0;"></td>
                                <td id="2" style="padding:0;border:0;margin:0;height:0px;width:50px"></td>
                                <td id="3" style="padding:0;border:0;margin:0;height:0px;width:180px"></td>
                                <td id="4" style="padding:0;border:0;margin:0;height:0px;width:120px"></td>
                                <td id="5" style="padding:0;border:0;margin:0;height:0px;width:120px"></td>
                                <td id="6" style="padding:0;border:0;margin:0;height:0px;width:280px"></td>
                                <td id="7" style="padding:0;border:0;margin:0;height:0px;width:270px"></td>
                                <td id="8" style="padding:0;border:0;margin:0;height:0px;width:90px"></td>
                                <td id="9" style="padding:0;border:0;margin:0;height:0px;width:120px"></td>
                             <!--    <td id="10" style="padding:0;border:0;margin:0;height:0px;width:90px"></td>-->
                                <td style="width:0px;"></td>
                            </tr>
                            <tr>
                                <td style="width:0;"></td>
                                <td id="mini-69$headerCell2$2" class="mini-grid-headerCell    mini-grid-bottomCell " style="text-align:center;">
                                    <div class="mini-grid-headerCell-outer">
                                        <div class="mini-grid-headerCell-inner  mini-grid-headerCell-nowrap ">序号</div>
                                        <div id="2" class="mini-grid-column-splitter"></div>
                                    </div>
                                </td>
                                <td id="mini-69$headerCell2$3" class="mini-grid-headerCell    mini-grid-bottomCell " style="text-align:center;">
                                    <div class="mini-grid-headerCell-outer">
                                        <div class="mini-grid-headerCell-inner  mini-grid-headerCell-nowrap ">公司名</div>
                                        <div id="3" class="mini-grid-column-splitter"></div>
                                    </div>
                                </td>
                                <td id="mini-69$headerCell2$4" class="mini-grid-headerCell    mini-grid-bottomCell " style="text-align:center;">
                                    <div class="mini-grid-headerCell-outer">
                                        <div class="mini-grid-headerCell-inner  mini-grid-headerCell-nowrap ">联系人</div>
                                        <div id="4" class="mini-grid-column-splitter"></div>
                                    </div>
                                </td>
                                <td id="mini-69$headerCell2$5" class="mini-grid-headerCell    mini-grid-bottomCell " style="text-align:center;">
                                    <div class="mini-grid-headerCell-outer">
                                        <div class="mini-grid-headerCell-inner  mini-grid-headerCell-nowrap ">联系人电话</div>
                                        <div id="5" class="mini-grid-column-splitter"></div>
                                    </div>
                                </td>
                                <td id="mini-69$headerCell2$6" class="mini-grid-headerCell    mini-grid-bottomCell " style="text-align:center;">
                                    <div class="mini-grid-headerCell-outer">
                                        <div class="mini-grid-headerCell-inner  mini-grid-headerCell-nowrap ">GUID</div>
                                        <div id="6" class="mini-grid-column-splitter"></div>
                                    </div>
                                </td>
                                <td id="mini-69$headerCell2$7" class="mini-grid-headerCell    mini-grid-bottomCell " style="text-align:center;">
                                    <div class="mini-grid-headerCell-outer">
                                        <div class="mini-grid-headerCell-inner  mini-grid-headerCell-nowrap ">UNISCID</div>
                                        <div id="7" class="mini-grid-column-splitter"></div>
                                    </div>
                                </td>
                            <!-- <td id="mini-69$headerCell2$8" class="mini-grid-headerCell    mini-grid-bottomCell " style="text-align:center;">
                                    <div class="mini-grid-headerCell-outer">
                                        <div class="mini-grid-headerCell-inner  mini-grid-headerCell-nowrap ">车辆数</div>
                                        <div id="8" class="mini-grid-column-splitter">
                                        </div>
                                    </div>
                                </td>--> 
                                <td id="mini-69$headerCell2$8" class="mini-grid-headerCell    mini-grid-bottomCell " style="text-align:center;">
                                    <div class="mini-grid-headerCell-outer">
                                        <div class="mini-grid-headerCell-inner  mini-grid-headerCell-nowrap ">是否删除</div>
                                        <div id="8" class="mini-grid-column-splitter">
                                        </div>
                                    </div>
                                </td>
                                <td class="mini-grid-headerCell    mini-grid-bottomCell " style="text-align:center;">
                                    <div class="mini-grid-headerCell-outer">
                                    <div class="mini-grid-headerCell-inner  mini-grid-headerCell-nowrap ">事件</div>
                                    <div id="9" class="mini-grid-column-splitter"></div></div>
                                </td>

                            </tr>
                        </tbody>
                    </table>
                </div>


                <div class="mini-grid-rows-content">
                    <table class="mini-grid-table mini-grid-rowstable" cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
                        <tbody>
                            <tr style="height:0px;">
                                <td style="height:0px;width:0;"></td>
                                <td id="2" style="padding:0;border:0;margin:0;height:0px;width:50px"></td>
                                <td id="3" style="padding:0;border:0;margin:0;height:0px;width:180px"></td>
                                <td id="4" style="padding:0;border:0;margin:0;height:0px;width:120px"></td>
                                <td id="5" style="padding:0;border:0;margin:0;height:0px;width:120px"></td>
                                <td id="6" style="padding:0;border:0;margin:0;height:0px;width:280px"></td>
                                <td id="7" style="padding:0;border:0;margin:0;height:0px;width:270px"></td>
                              <!--     <td id="8" style="padding:0;border:0;margin:0;height:0px;width:90px"></td>-->  
                          <td id="8" style="padding:0;border:0;margin:0;height:0px;width:90px"></td>
                                <td id="9" style="padding:0;border:0;margin:0;height:0px;width:120px"></td>
                                <!--    <td id="10" style="padding:0;border:0;margin:0;height:0px;width:90px"></td>-->  
                                <td style="width:0px;"></td>
                            </tr>
                            <tr id="mini-69$emptytext2" style="display:none;"><td style="width:0"></td><td class="mini-grid-emptyText" colspan="12">没有返回的数据</td></tr>
                            <tr class="mini-grid-row  " style=" " v-for="(item,index) in list" :class="{colorbg:index%2==1}">
                                <td style="width:0;"></td>
                                <td class="mini-grid-cell " style="text-align:center;"><div class="mini-grid-cell-inner  mini-grid-cell-nowrap " style=""><div id="mini-69$number$7189">{{index+1}}</div></div></td>
                                <td class="mini-grid-cell " style="text-align:center;">
                                <div class="mini-grid-cell-inner  mini-grid-cell-nowrap " style="">{{item.ComapnyName}}</div></td>
                                <td class="mini-grid-cell " style="text-align:center;">
                                    <div class="mini-grid-cell-inner  mini-grid-cell-nowrap " style="" >
                                        {{item.Clerk}}
                                    </div>
                                </td>
                                <td class="mini-grid-cell " style="text-align:center;">
                                    <div class="mini-grid-cell-inner  mini-grid-cell-nowrap " style="">
                                      {{item.ClerkTel}}
                                    </div>

                                   
                                </td>
                                <td class="mini-grid-cell " style="text-align:center;"><div class="mini-grid-cell-inner  mini-grid-cell-nowrap " style="">
                                    {{item.Company}}</div></td>
                                <td class="mini-grid-cell " style="text-align:center;"><div class="mini-grid-cell-inner  mini-grid-cell-nowrap " style="" >
                                    {{item.UNISCID}}</div></td>
                          <!--    <td class="mini-grid-cell " style="text-align:center;">
                                    <div class="mini-grid-cell-inner  mini-grid-cell-nowrap " style="">
                                        
                                        {{item.num}}
                                    </div>
                                   
                                </td>-->
                                <td class="mini-grid-cell " style="text-align:center;">
                                    <div class="mini-grid-cell-inner  mini-grid-cell-nowrap " style="">

                                        <div v-if="item.IsDeleted" style="color: blue;">是</div>
                                        <div v-if="item.IsDeleted==false" style="color: brown;">否</div>
                                    </div>

                                </td>

                                <td class="mini-grid-cell " style="text-align:center;">
                                    <div class="mini-grid-cell-inner  mini-grid-cell-nowrap " style="">
                                        <a href="javascript:void(0)" @click="del(item)">
                                            删除
                                        </a>
                                    </div>
                                </td>

                            </tr>

                        </tbody>
                    </table>
                </div>
            </div>

        </div>
    </div>

    <script>

      
        var list = new Vue({
            el: '#app',
            data: {
                list: [],
                listCompany: [],
                path: ""
            }, computed: {
                
            }, methods: {
                addlist: function (item) {
             //       console.log(this.list)
                    this.list.push(item);
                },
                query: function (item) {
                    console.log(item)
                    window.sendlistData("Enter", item);
                },
                //打开删除事件
                del: function (item) {
                    var ty = {
                        type: "del",
                        data: item,
                        time: new Date().getTime()
                    }
                    window.sendlistData("Enter", ty);
                },
                SetClick: function (item) {
                //    console.log(item)
                },
                //获取公司车辆台数
                setCount: function () {
            
                    for (var n2 = 0; n2 < this.listCompany.length; n2++) {
                        for (var n1 = 0; n1 < this.list.length; n1++) {
                            console.log(this.list[n1].Comapny)
                            if (this.listCompany[n2].Department == this.list[n1].Company) {
                                if (this.list[n1].num) {
                                    this.list[n1].num = this.list[n1].num + 1;
                                   
                                } else {

                                    this.list[n1].num = 1;
                                   
                                }
                            } 

                        }
                    }

                }
                
            }
        });
        $(document).ready(function () {
               //获取公司
            httppost("ups/ztpls/bl/PullCompany", { pageIndex: 1, pageSize: 0, IsDeleted: false, condition: {}, ComapnyName: "1" }

                ,
                function (data) {
                    var listtime=data.data.result;
                    for (var n1 = 0; n1 < listtime.length; n1++) {
                        var da = listtime[n1];
                        da.num = 0;

                        list.addlist(da);
                    }

                  /**  httppost("ups/ztpls/bl/PullVehicle", { pageIndex: 1, pageSize: 0, IsDeleted: false, condition: {}, PlateNumber: "" }

                        ,
                        function (data) {
                            var listtime = data.data.result;

                            list.listCompany = listtime;
                            
                            list.setCount();
                        },
                        function (err) { })**/
                  //  console.log(data.data.result)
                },
                function (err) { })

        })

    </script>
</body>
</html>